package xiaohu.day0.HJ1;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String s = scanner.nextLine();
            String[] split = s.split(" ");
            int length = split.length;
            int rightLength = split[length - 1].length();
            System.out.println(rightLength);
        }
    }
}
